package com.neusoft.yuejian_6.activity;

import android.app.Activity;

import android.os.Bundle;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;

import com.neusoft.yuejian_6.R;
import com.squareup.picasso.Picasso;

public class ActInfoActivity extends Activity {


    private ImageView activity_pic;
    private TextView activity_intro;
    private TextView activity_phone;
    private TextView activity_address;
    private int activity_id;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏

        setContentView(R.layout.activity_act_info);

        initView();
        getActivityData();
    }

    private void getActivityData() {
        Bundle bundle = this.getIntent().getExtras();
        String activityintro = bundle.getString("activity_intro");
        String activityaddress = bundle.getString("activity_address");
        String activityphone = bundle.getString("activity_phone");
        // int tprice = bundle.getInt("t_price");
        String tpic = "http://10.0.2.2/neu1_yuejian/Public/Admin/photo/"+bundle.getString("activity_pic");
        //String ttime = bundle.getString("t_time");
        //System.out.print("taddress");
        activity_intro.setText(activityintro);
        activity_address.setText(activityaddress);
        activity_phone.setText(activityphone+"");
        // t_price.setText(tprice+"");
        //System.out.print("train_intro");
        //   t_time.setText(ttime);
        Picasso.with(this).load(tpic).into(activity_pic);
    }


    private void initView() {

        activity_pic = (ImageView) findViewById(R.id.activity_pic);
        activity_intro = (TextView) findViewById(R.id.activity_intro);
        activity_address = (TextView) findViewById(R.id.activity_address);
      activity_phone = (TextView) findViewById(R.id.activity_phone);
    }

    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */

}

